const router = require('koa-router')(),
      indexController = require('../controllers/IndexController'),
      loginCheckMW = require('../middlewares/loginCheck');


// router.get('/', indexController.index);
router.get('/get_course_data', loginCheckMW, indexController.getCourses);
router.get('/get_recom_course', loginCheckMW, indexController.getRecomCourse);
router.get('/get_slider_data', loginCheckMW, indexController.getSliderInfo);
router.get('/get_course_collection', loginCheckMW, indexController.getCourseCollectionInfo);
router.get('/get_teachers', loginCheckMW, indexController.getTeachers);
router.get('/get_students', loginCheckMW, indexController.getStudents);

router.post('/change_course_field', loginCheckMW, indexController.changeCourseField);
//公用 上下架改变
router.post('/change_data_status', loginCheckMW, indexController.changeDataStatus);
router.post('/select_star_teacher', loginCheckMW, indexController.changeTeacherStar);

module.exports = router;